package com.cloud.ceshi.service;

import com.cloud.ceshi.mode.entity.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cloud.common.core.exception.InventoryShortageException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zwb
 * @since 2025-07-07
 */
public interface IProductService extends IService<Product> {
    /**
     * 扣减库存
     *
     * @param productId 商品 ID
     * @param amount 扣减数量
     * @return 商品总价
     */
    Double reduceStock(Long productId, Integer amount);
}
